#ifndef VTKFIELDIMPORT_HPP
#define VTKFIELDIMPORT_HPP

#include "vtkFunctions.hpp"
#include "vtkFunctions_import.hpp"
#include "vtkConstants.hpp"
#include "field.hpp"
#include "solverBase.hpp"
#include "functionParserWrapper.hpp"
#include "tinyxml2.h"
#include "magic_enum.hpp"

namespace hms::vtk
{

template<typename T>
maybe_const_XMLElement<T>* findFieldData(
	T* cellData,
	const std::string& fieldName,
	Index nComponents = {signalCode::uninitialised}
);


template<typename MeshType>
std::vector<FunctionParserWrapper> readDomainValues(
	const xml::XMLElement* cellData,
	Field<MeshType>& field,
	const std::string& fieldName
);


template<typename SolverType>
void readDomainFields(
	const xml::XMLElement* vtk,
	SolverBase<SolverType>& solver,
	bool skipZField
);


template<typename SolverType>
void readDomainFields(
	const xml::XMLDocument* doc,
	SolverBase<SolverType>& solver,
	bool skipZField = false
);

} // namespace hms

#include "vtkFieldImport.tpp"

#endif